home *** CD-ROM | disk | FTP | other *** search
/ Macwelt 4 / Macwelt DVD 4.cdr / Internet / Internet-Utilities / Mac-OS X / darkstat-2.2 / src / host_db.h < prev    next >
MacBinary  |  2002-09-23  |  1.9 KB  |  [□□□□/□□□□]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: MacBinary (archive/macBinary).

ConfidenceProgramDetectionMatch TypeSupport
1% dexvert MacBinary (archive/macBinary) fallback Supported
100% file MacBinary II, inited, Mon Sep 23 03:32:07 2002, modified Mon Sep 23 03:32:07 2002, 1367 bytes "host_db.h" , at 0x5d7 286 bytes resource default (weak)
99% file data default
100% TrID MacBinary 2 default (weak)
100% dearkID deark: macbinary default
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default
100% librempegprobeID NGC (Nintendo DSP Standard) (ngcdspstd) default (weak)


id metadata
keyvalue
macFileType[□□□□]
macFileCreator[□□□□]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 09 68 6f 73 74 5f 64 | 62 2e 68 00 00 00 00 00 |..host_d|b.h.....|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 00 00 00 00 00 00 00 | 00 01 00 00 00 00 00 00 |........|........|
|00000050| 00 00 00 00 00 05 57 00 | 00 01 1e b9 b4 73 f7 b9 |......W.|.....s..|
|00000060| b4 73 f7 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |.s......|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 ff 8e 00 00 |........|........|
|00000080| 0a 2f 2a 20 64 61 72 6b | 73 74 61 74 3a 20 61 20 |./* dark|stat: a |
|00000090| 6e 65 74 77 6f 72 6b 20 | 74 72 61 66 66 69 63 20 |network |traffic |
|000000a0| 61 6e 61 6c 79 7a 65 72 | 0a 20 2a 20 28 63 29 20 |analyzer|. * (c) |
|000000b0| 32 30 30 31 2d 32 30 30 | 32 2c 20 45 6d 69 6c 20 |2001-200|2, Emil |
|000000c0| 4d 69 6b 75 6c 69 63 2e | 0a 20 2a 2f 0a 0a 23 69 |Mikulic.|. */..#i|
|000000d0| 66 6e 64 65 66 20 5f 5f | 48 4f 53 54 5f 44 42 5f |fndef __|HOST_DB_|
|000000e0| 48 0a 23 64 65 66 69 6e | 65 20 5f 5f 48 4f 53 54 |H.#defin|e __HOST|
|000000f0| 5f 44 42 5f 48 0a 0a 23 | 69 6e 63 6c 75 64 65 20 |_DB_H..#|include |
|00000100| 22 62 69 67 6e 75 6d 2e | 68 22 0a 23 69 6e 63 6c |"bignum.|h".#incl|
|00000110| 75 64 65 20 22 64 62 2e | 68 22 0a 23 69 6e 63 6c |ude "db.|h".#incl|
|00000120| 75 64 65 20 3c 73 74 64 | 69 6f 2e 68 3e 0a 0a 2f |ude <std|io.h>../|
|00000130| 2a 20 4d 61 78 69 6d 75 | 6d 20 64 61 74 61 20 74 |* Maximu|m data t|
|00000140| 72 61 6e 73 66 65 72 20 | 76 61 6c 75 65 20 74 68 |ransfer |value th|
|00000150| 65 20 44 42 20 63 61 6e | 20 68 6f 6c 64 20 69 73 |e DB can| hold is|
|00000160| 20 32 5e 36 34 3a 0a 20 | 2a 20 31 38 2c 34 34 36 | 2^64:. |* 18,446|
|00000170| 2c 37 34 34 2c 30 37 33 | 2c 37 30 39 2c 35 35 31 |,744,073|,709,551|
|00000180| 2c 36 31 36 20 20 42 79 | 74 65 73 0a 20 2a 20 31 |,616 By|tes. * 1|
|00000190| 38 2c 30 31 34 2c 33 39 | 38 2c 35 30 39 2c 34 38 |8,014,39|8,509,48|
|000001a0| 31 2c 39 38 34 20 20 20 | 20 20 4b 42 79 74 65 73 |1,984 | KBytes|
|000001b0| 0a 20 2a 20 31 37 2c 35 | 39 32 2c 31 38 36 2c 30 |. * 17,5|92,186,0|
|000001c0| 34 34 2c 34 31 36 20 20 | 20 20 20 20 20 20 20 4d |44,416 | M|
|000001d0| 42 79 74 65 73 0a 20 2a | 20 31 37 2c 31 37 39 2c |Bytes. *| 17,179,|
|000001e0| 38 36 39 2c 31 38 34 20 | 20 20 20 20 20 20 20 20 |869,184 | |
|000001f0| 20 20 20 20 47 42 79 74 | 65 73 0a 20 2a 20 31 36 | GByt|es. * 16|
|00000200| 2c 37 37 37 2c 32 31 36 | 20 20 20 20 20 20 20 20 |,777,216| |
|00000210| 20 20 20 20 20 20 20 20 | 20 54 42 79 74 65 73 0a | | TBytes.|
|00000220| 20 2a 0a 20 2a 20 47 6f | 6f 64 20 66 6f 72 20 61 | *. * Go|od for a|
|00000230| 20 66 65 77 20 6d 6f 72 | 65 20 79 65 61 72 73 2e | few mor|e years.|
|00000240| 0a 20 2a 2f 0a 0a 74 79 | 70 65 64 65 66 20 73 74 |. */..ty|pedef st|
|00000250| 72 75 63 74 20 7b 0a 09 | 64 77 6f 72 64 20 69 70 |ruct {..|dword ip|
|00000260| 5f 61 64 64 72 3b 0a 09 | 63 68 61 72 20 2a 68 6f |_addr;..|char *ho|
|00000270| 73 74 6e 61 6d 65 3b 0a | 09 69 6e 74 36 34 20 64 |stname;.|.int64 d|
|00000280| 61 74 61 5f 69 6e 3b 0a | 09 69 6e 74 36 34 20 64 |ata_in;.|.int64 d|
|00000290| 61 74 61 5f 6f 75 74 3b | 0a 7d 20 68 6f 73 74 5f |ata_out;|.} host_|
|000002a0| 72 65 63 6f 72 64 3b 0a | 0a 23 64 65 66 69 6e 65 |record;.|.#define|
|000002b0| 20 43 4c 41 53 53 41 28 | 69 70 29 20 28 28 69 70 | CLASSA(|ip) ((ip|
|000002c0| 20 3e 3e 20 32 34 29 20 | 26 20 30 78 46 46 29 0a | >> 24) |& 0xFF).|
|000002d0| 0a 0a 0a 2f 2a 20 47 6c | 6f 62 61 6c 20 64 61 74 |.../* Gl|obal dat|
|000002e0| 61 62 61 73 65 20 2a 2f | 0a 65 78 74 65 72 6e 20 |abase */|.extern |
|000002f0| 64 62 20 68 6f 73 74 5f | 64 62 5b 32 35 36 5d 3b |db host_|db[256];|
|00000300| 0a 65 78 74 65 72 6e 20 | 68 6f 73 74 5f 72 65 63 |.extern |host_rec|
|00000310| 6f 72 64 20 2a 6c 6f 63 | 61 6c 5f 68 6f 73 74 5f |ord *loc|al_host_|
|00000320| 72 65 63 3b 0a 0a 0a 0a | 76 6f 69 64 20 68 6f 73 |rec;....|void hos|
|00000330| 74 5f 64 62 5f 69 6e 69 | 74 28 76 6f 69 64 29 3b |t_db_ini|t(void);|
|00000340| 0a 76 6f 69 64 20 68 6f | 73 74 5f 64 62 5f 66 72 |.void ho|st_db_fr|
|00000350| 65 65 28 76 6f 69 64 29 | 3b 0a 69 6e 6c 69 6e 65 |ee(void)|;.inline|
|00000360| 20 64 77 6f 72 64 20 68 | 6f 73 74 5f 64 62 5f 75 | dword h|ost_db_u|
|00000370| 73 65 64 28 76 6f 69 64 | 29 3b 0a 0a 2f 2a 20 68 |sed(void|);../* h|
|00000380| 6f 73 74 5f 72 65 63 6f | 72 64 20 6e 65 65 64 73 |ost_reco|rd needs|
|00000390| 20 74 6f 20 62 65 20 64 | 65 61 6c 6c 6f 63 61 74 | to be d|eallocat|
|000003a0| 65 64 20 77 68 65 6e 20 | 69 74 27 73 20 6e 6f 20 |ed when |it's no |
|000003b0| 6c 6f 6e 67 65 72 20 6e | 65 65 64 65 64 20 2a 2f |longer n|eeded */|
|000003c0| 0a 69 6e 6c 69 6e 65 20 | 68 6f 73 74 5f 72 65 63 |.inline |host_rec|
|000003d0| 6f 72 64 20 2a 68 6f 73 | 74 5f 6d 61 6b 65 28 63 |ord *hos|t_make(c|
|000003e0| 6f 6e 73 74 20 64 77 6f | 72 64 20 69 70 5f 61 64 |onst dwo|rd ip_ad|
|000003f0| 64 72 29 3b 0a 0a 2f 2a | 20 61 64 64 20 6f 72 20 |dr);../*| add or |
|00000400| 66 69 6e 64 20 61 20 68 | 6f 73 74 20 62 79 20 69 |find a h|ost by i|
|00000410| 70 20 2a 2f 0a 69 6e 6c | 69 6e 65 20 68 6f 73 74 |p */.inl|ine host|
|00000420| 5f 72 65 63 6f 72 64 20 | 2a 68 6f 73 74 5f 66 72 |_record |*host_fr|
|00000430| 6f 6d 5f 69 70 28 63 6f | 6e 73 74 20 64 77 6f 72 |om_ip(co|nst dwor|
|00000440| 64 20 69 70 29 3b 0a 0a | 2f 2a 20 61 64 64 20 6f |d ip);..|/* add o|
|00000450| 72 20 75 70 64 61 74 65 | 20 61 20 68 6f 73 74 2c |r update| a host,|
|00000460| 20 64 65 70 65 6e 64 69 | 6e 67 20 6f 6e 20 77 68 | dependi|ng on wh|
|00000470| 65 74 68 65 72 20 69 74 | 20 65 78 69 73 74 73 20 |ether it| exists |
|00000480| 69 6e 20 74 68 65 20 64 | 62 20 6f 72 20 6e 6f 74 |in the d|b or not|
|00000490| 20 2a 2f 0a 69 6e 6c 69 | 6e 65 20 76 6f 69 64 20 | */.inli|ne void |
|000004a0| 68 6f 73 74 5f 74 72 61 | 6e 73 66 65 72 5f 69 6e |host_tra|nsfer_in|
|000004b0| 28 63 6f 6e 73 74 20 64 | 77 6f 72 64 20 69 70 2c |(const d|word ip,|
|000004c0| 20 63 6f 6e 73 74 20 64 | 77 6f 72 64 20 69 6e 29 | const d|word in)|
|000004d0| 3b 0a 69 6e 6c 69 6e 65 | 20 76 6f 69 64 20 68 6f |;.inline| void ho|
|000004e0| 73 74 5f 74 72 61 6e 73 | 66 65 72 5f 6f 75 74 28 |st_trans|fer_out(|
|000004f0| 63 6f 6e 73 74 20 64 77 | 6f 72 64 20 69 70 2c 20 |const dw|ord ip, |
|00000500| 63 6f 6e 73 74 20 64 77 | 6f 72 64 20 6f 75 74 29 |const dw|ord out)|
|00000510| 3b 0a 0a 69 6e 6c 69 6e | 65 20 64 77 6f 72 64 20 |;..inlin|e dword |
|00000520| 69 70 5f 66 72 6f 6d 5f | 71 75 61 64 28 63 6f 6e |ip_from_|quad(con|
|00000530| 73 74 20 69 6e 74 20 61 | 2c 20 63 6f 6e 73 74 20 |st int a|, const |
|00000540| 69 6e 74 20 62 2c 20 63 | 6f 6e 73 74 20 69 6e 74 |int b, c|onst int|
|00000550| 20 63 2c 20 63 6f 6e 73 | 74 20 69 6e 74 20 64 29 | c, cons|t int d)|
|00000560| 3b 0a 0a 69 6e 6c 69 6e | 65 20 68 6f 73 74 5f 72 |;..inlin|e host_r|
|00000570| 65 63 6f 72 64 20 2a 2a | 68 6f 73 74 5f 64 62 5f |ecord **|host_db_|
|00000580| 73 6f 72 74 28 73 6f 72 | 74 5f 74 79 70 65 20 73 |sort(sor|t_type s|
|00000590| 74 29 3b 0a 0a 76 6f 69 | 64 20 68 6f 73 74 5f 64 |t);..voi|d host_d|
|000005a0| 62 5f 73 61 76 65 28 46 | 49 4c 45 20 2a 66 70 29 |b_save(F|ILE *fp)|
|000005b0| 3b 0a 69 6e 74 20 68 6f | 73 74 5f 64 62 5f 6c 6f |;.int ho|st_db_lo|
|000005c0| 61 64 28 46 49 4c 45 20 | 2a 66 70 29 3b 0a 0a 23 |ad(FILE |*fp);..#|
|000005d0| 65 6e 64 69 66 0a 0a 00 | 00 00 00 00 00 00 00 00 |endif...|........|
|000005e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000600| 00 00 01 00 00 00 01 00 | 00 00 00 00 00 00 00 1e |........|........|
|00000610| 54 68 69 73 20 72 65 73 | 6f 75 72 63 65 20 66 6f |This res|ource fo|
|00000620| 72 6b 20 69 6e 74 65 6e | 74 69 6f 6e 61 6c 6c 79 |rk inten|tionally|
|00000630| 20 6c 65 66 74 20 62 6c | 61 6e 6b 20 20 20 00 00 | left bl|ank ..|
|00000640| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000650| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000660| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000670| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000680| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000690| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000006a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000006b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000006c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000006d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000006e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000006f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000700| 00 00 01 00 00 00 01 00 | 00 00 00 00 00 00 00 1e |........|........|
|00000710| 00 00 00 00 00 00 00 00 | 00 1c 00 1e ff ff 00 00 |........|........|
|00000720| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000730| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000740| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000750| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000760| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000770| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+